package com.bdk.middle.orchestration.api.client;

import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.orchestration.api.domain.AppManagerDO;

import com.bdk.middle.orchestration.api.query.AppManagerQueryDO;
import org.springframework.web.bind.annotation.*;


public interface AppClientApi {

    /**
     * 添加应用
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/add.html", method = RequestMethod.POST)
    public @ResponseBody
    ResultDO add(@RequestBody AppManagerDO domain);

    /**
     * 修改应用信息
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/edit.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO edit(@RequestBody AppManagerDO domain);

    /**
     * 获取应用详情
     * @param id 用户ID
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/get.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO get(@RequestParam("id") String id);

    /**
     * 删除应用
     * @param id 用户ID
     * @param modifier 修改人用户名
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/remove.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO remove(@RequestParam("id") String id, @RequestParam("modifier") String modifier);

    /**
     * 查找应用列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/find.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO find(@RequestBody AppManagerQueryDO domain);

    /**
     * 改变应用状态
     * @param id
     * @param status
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/updateStatus.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO updateStatus(@RequestParam("id") String id, @RequestParam("status") int status, @RequestParam("modifier") String modifier);

    /**
     * 设置应用使用的模块
     * @param domain 查询DO
     * @return ResultDO
     */
    @RequestMapping(value="/app_cliet_api/setAppModule.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO setAppModule(@RequestBody AppManagerDO domain);


}
